package day01.cn.itcast.reflect;

import day01.cn.itcast.doMain.Person;
import day01.cn.itcast.doMain.Student;

/**
 * @author Lenovo
 */
public class ReflectDemo1 {
    public static void main(String[] args) throws ClassNotFoundException {
   Class cls1=Class.forName("day01.cn.itcast.doMain.Person");
        System.out.println(cls1);
        Class cls2= Person.class;
        System.out.println(cls2);
        Person p=new Person();
        Class cls3=p.getClass();
        System.out.println(cls3);

        System.out.println(cls1==cls2);
        System.out.println(cls1==cls3);

        Class c=Student.class;
        System.out.println(c==cls2);
    }
}
